package com.slz3.business.module.orderManagement.ordOrderLogistics.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.orderManagement.ordOrderLogistics.domain.OrdOrderLogistics;
import com.slz3.business.module.orderManagement.ordOrderLogistics.domain.OrdOrderLogisticsCondition;
import org.springframework.stereotype.Controller;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

public class OrdOrderLogisticsResController extends OrdOrderLogisticsResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, OrdOrderLogistics ordOrderLogistics) {
        if (OrdOrderLogisticsResUnsafeValid.add(req, ordOrderLogistics)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$OrdOrderLogisticsUpdateLock(req, ordOrderLogistics);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        if (OrdOrderLogisticsResUnsafeValid.delete(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, OrdOrderLogistics ordOrderLogistics) {
        if (OrdOrderLogisticsResUnsafeValid.modify(req, ordOrderLogistics)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$OrdOrderLogisticsUpdateLock(req, ordOrderLogistics);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (OrdOrderLogisticsResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return ordOrderLogisticsResAtomic.info_$OrdOrderLogisticsUpdateLock(req);
        if (OrdOrderLogisticsResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$OrdOrderLogisticsUpdateLock(req);
        }
    }

    public Mono<ServerResponse> query(ServerRequest req) {
        return super.query_$OrdOrderLogisticsUpdateLock(req);
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (OrdOrderLogisticsResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        //
        if (OrdOrderLogisticsResUnsafeValid.auditSubmit(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        if (OrdOrderLogisticsResUnsafeValid.audit(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        if (OrdOrderLogisticsResUnsafeValid.auditReject(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        if (OrdOrderLogisticsResUnsafeValid.usingEnable(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, OrdOrderLogisticsCondition ordOrderLogisticsCondition) {
        if (OrdOrderLogisticsResUnsafeValid.usingDisable(req, ordOrderLogisticsCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$OrdOrderLogisticsUpdateLock(req, ordOrderLogisticsCondition);
        }
    }

}
